<?php

namespace app\admin\model\apply;

use think\Model;


class Confg extends Model
{

    

    

    // 表名
    protected $name = 'sys_config';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [
        'bottom_data_text',
        'integral_data_text',
    ];
    

    
    /*2023-6-28 lina 新增 start*/
    public function getBottomDataList()
    {
        return ['1' => __('Bottom_data 1'), '2' => __('Bottom_data 2')];
    }
    public function getIntegralDataList()
    {
        return ['1' => __('Integral_data 1'), '2' => __('Integral_data 2')];
    }

    public function getBottomDataTextAttr($value, $data)
    {
        $value = $value ? $value : (isset($data['bottom_data']) ? $data['bottom_data'] : '');
        $list = $this->getBottomDataList();
        return isset($list[$value]) ? $list[$value] : '';
    }
    public function getIntegralDataTextAttr($value, $data)
    {
        $value = $value ? $value : (isset($data['integral_data']) ? $data['integral_data'] : '');
        $list = $this->getIntegralDataList();
        return isset($list[$value]) ? $list[$value] : '';
    }
    /*2023-6-28 lina 新增 end*/




}
